#include <stdio.h>
#include <unistd.h>

int main()
{
  int rc;
  int p[2];
  char buffer[40];
  
  close(2);
  
  rc = pipe(p);
  printf("%d %d\n", p[0], p[1]);
  fprintf(stderr, "MAJOR ERROR\n");
  
  rc = read(p[1], buffer, 40);
  buffer[rc] = '\0';
  printf("%s\n", buffer);
  printf("BYE\n");
  
  return 0;
}
